Skip to main content

attachContextMenuClickEvent

Defines the method to add an event listener, a function that will be called whenever the specified event is clicked in the context menu.

Syntax

expression.attachContextMenuClickEvent(id, action);

expression - A variable that represents a Plugin class.

Parameters

NameRequired/OptionalData typeDefaultDescription
idRequiredstringThe event name.
actionRequiredfunctionThe event listener.

Returns

This method doesn't return any data.

Example

window.Asc.plugin.attachContextMenuClickEvent("onClickItem1Sub1", function(){
window.Asc.plugin.executeMethod("InputText", ["clicked: onClickItem1Sub1"]);
});